import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import tailwindcss from '@tailwindcss/vite'

// https://vite.dev/config/
export default defineConfig({
  plugins: [react(), tailwindcss()],
  base: '/',
  server: {
    port: 3000,
    proxy: {
      '/api': {
        target: 'http://110.40.83.188:8825',
        changeOrigin: true,
        // secure: false
      },
      // rewrite: (path) => path.replace(/^\/api/, ""),
      // configure: (proxy, option) => {
      //   proxy.on("proxyReq", (proxyReq, req, res) => {
      //     proxyReq.removeHeader("Referer")
      //     // proxyReq.removeHeader("Origin")
      //   })
      // }
    },
    // host: '0.0.0.0'
  },
})
